﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Bll;

namespace StockServer
{
    public partial class AddUser : Form
    {ClientUser cu=new ClientUser();
        public AddUser()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
           
           string acno= this.txtAcNo.Text;
          string ecno = this.txtEcNo.Text;
          string ename=  this.txtEName.Text;
           string enename= this.txtEnename.Text;
         string Password=   this.txtPassword.Text;
         string balance = this.txtBalance.Text;
         if (acno == "" || ecno == "" || ename == "" || enename == "" || Password == "" || this.txtBalance.Text == "")
         {
             MessageBox.Show("请输入完整！");
             return;
         }
         else
         {
             cu.AddUser(acno, ecno, ename, enename, Password, Convert.ToDouble(balance));
             MessageBox.Show("新增成功");
             this.Close();
         
         }

        }
    }
}